package com.pf.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty(prefix = "custom.pf", value = "enable", matchIfMissing = true)
@EnableConfigurationProperties(CustomProperties.class)
@ConditionalOnClass(CustomUrlHelper.class)
public class CustomAutoConfig {

    @Bean
    public CustomUrlHelper customUrlHelper() {
        return new CustomUrlHelper();
    }
}
